﻿#region Copyright Notice
// 
// 
//  
//  Copyright (c) 2009-2011 Anindya Chatterjee
//  
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//  
//      http://www.apache.org/licenses/LICENSE-2.0
//  
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
// 
// 
#endregion
using System;
using System.Collections.Generic;

namespace AbstractClass.NPerf
{
    /// <summary>
    /// Represents a performance test suite.
    /// </summary>
    public class TestSuite
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TestSuite"/> class.
        /// </summary>
        public TestSuite()
        {
            Description = null;
            FeatureDescription = null;
            Machine = null;
            Os = null;
            TimeStamp = DateTime.Now;
            Tests = new List<TestUnit>();
            IgnoredTests = new List<TestUnit>();
            FailedResult = new List<FailedResult>();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TestSuite"/> class.
        /// </summary>
        /// <param name="description">The description of test suite.</param>
        /// <param name="featureDescription">The feature description.</param>
        public TestSuite(string description, string featureDescription)
        {
            Description = null;
            FeatureDescription = null;
            Machine = null;
            Os = null;

            TimeStamp = DateTime.Now;
            Description = description;
            FeatureDescription = featureDescription;
            Tests = new List<TestUnit>();
            IgnoredTests = new List<TestUnit>();
            FailedResult = new List<FailedResult>();
            Machine = PerfMachine.GetCurrent();
            Os = PerfOs.GetCurrent();
        }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the feature description.
        /// </summary>
        /// <value>The feature description.</value>
        public string FeatureDescription { get; set; }

        /// <summary>
        /// Gets or sets the time stamp.
        /// </summary>
        /// <value>The time stamp.</value>
        public DateTime TimeStamp { get; set; }

        /// <summary>
        /// Gets or sets the test machine.
        /// </summary>
        /// <value>The test machine.</value>
        public PerfMachine Machine { get; set; }

        /// <summary>
        /// Gets or sets the test machine's operating system.
        /// </summary>
        /// <value>The test machine's operating system.</value>
        public PerfOs Os { get; set; }

        /// <summary>
        /// Gets or sets the list of test units.
        /// </summary>
        /// <value>The list if test units.</value>
        public List<TestUnit> Tests { get; set; }

        /// <summary>
        /// Gets or sets the list of ignored test units.
        /// </summary>
        public List<TestUnit> IgnoredTests { get; set; }

        /// <summary>
        /// Gets or sets the list of failed test results.
        /// </summary>
        public List<FailedResult> FailedResult { get; set; }

        /// <summary>
        /// Gets or sets the test fixture.
        /// </summary>
        /// <value>The test fixture.</value>
        public TestFixture TestFixture { get; set; }
    }
}